# -*- coding: utf-8 -*-
from aop.api.base import BaseApi

class SubaccountAuthAddParam(BaseApi):
    """批量对某个主账号下面的子账号添加授权，前提是主账号已经授权

    References
    ----------
    https://open.1688.com/api/api.htm?ns=system.oauth2&n=subaccount.auth.add&v=1&cat=oauth2

    """

    def __init__(self, domain=None):
        BaseApi.__init__(self, domain)
        self.access_token = None
        self.subUserIdentityList = None

    def get_api_uri(self):
        return '1/system.oauth2/subaccount.auth.add'

    def get_required_params(self):
        return ['subUserIdentityList']

    def get_multipart_params(self):
        return []

    def need_sign(self):
        return True

    def need_timestamp(self):
        return False

    def need_auth(self):
        return True

    def need_https(self):
        return False

    def is_inner_api(self):
        return False
